package com.future.heatwave.network



import com.future.heatwave.db.entity.AchieveEntity
import com.future.heatwave.db.entity.AdRecord
import com.future.heatwave.db.entity.Appraise
import com.future.heatwave.db.entity.ConfAchieve
import com.future.heatwave.db.entity.ConfigA
import com.future.heatwave.db.entity.DotServer
import com.future.heatwave.db.entity.FreeSectionsEntity
import com.future.heatwave.db.entity.GainEntity
import com.future.heatwave.db.entity.ObtainListEntity
import com.future.heatwave.db.entity.ParticEntity
import com.future.heatwave.db.entity.Register
import com.future.heatwave.db.entity.SectionsEntity
import com.future.heatwave.db.entity.SignConfig
import com.future.heatwave.db.entity.SignRecord
import com.future.heatwave.db.entity.SkimReflection
import com.future.heatwave.db.entity.UnAutoCoins
import io.reactivex.rxjava3.core.Observable
import retrofit2.http.QueryMap

object ApiServiceImp {

    fun getAppraise(): Observable<Appraise> {
        return RetrofitManager.getApiClientApp().getAppraise()
    }

    fun getConfigActivity(): Observable<ConfigA> {
        return RetrofitManager.getApiClientApp().getConfigActivity()
    }

    fun getSignRecord(): Observable<SignRecord> {
        return RetrofitManager.getApiClientApp().getSignRecord()
    }

    fun getUnAutoCoinsMsgs(): Observable<UnAutoCoins> {
        return RetrofitManager.getApiClientApp().getUnAutoCoinsMsgs()
    }

    fun getSignConfig(@QueryMap body: HashMap<String, String>): Observable<SignConfig> {
        return RetrofitManager.getApiClientApp().getSignConfig(body)
    }

    fun getRegister(@QueryMap body: HashMap<String, String>): Observable<Register> {
        return RetrofitManager.getApiClientApp().getRegister(body)
    }



    fun getAchieve(): Observable<AchieveEntity> {
        return RetrofitManager.getApiClient().getAchieve()
    }


    fun getGain(): Observable<GainEntity> {
        return RetrofitManager.getApiClient().getGain()
    }

    fun getObtainList(): Observable<ObtainListEntity> {
        return RetrofitManager.getApiClient().getObtainList()
    }

    fun getPartic(@QueryMap body: HashMap<String, String>): Observable<ParticEntity>? {
        return body?.let { RetrofitManager.getApiClient().getPartic(it) }
    }

    fun getSections(@QueryMap body: HashMap<String, String>): Observable<SectionsEntity> {
        return RetrofitManager.getApiClient().getSections(body)
    }

    fun getFreeSectionsInfo(@QueryMap body: HashMap<String, String>): Observable<FreeSectionsEntity>{
        return  RetrofitManager.getApiClientApp().getFreeSectionsInfo(body)
    }
    fun getFreeSectionsInfo2(@QueryMap body: HashMap<String, String>): Observable<FreeSectionsEntity>{
        return  RetrofitManager.getApiClientApp2().getFreeSectionsInfo(body)
    }

    fun postAdRecord(@QueryMap body: HashMap<String, String>): Observable<AdRecord> {
        return RetrofitManager.getApiClientAD().postAdRecord(body)
    }
    fun getSkim(@QueryMap body: HashMap<String, String>): Observable<SkimReflection> {
        return  RetrofitManager.getApiClientLock().getSkim(body)
    }
    fun adsConfig(): Observable<ConfAchieve> {
        return  RetrofitManager.getApiClientLock().adsConfig()
    }
    fun dotServer(@QueryMap body: HashMap<String, String>): Observable<DotServer> {
        return  RetrofitManager.getApiClient().dotServer(body)
    }
    fun dotServerStart(@QueryMap body: HashMap<String, String>): Observable<DotServer> {
        return  RetrofitManager.getApiClientStart().dotServer(body)
    }
}